# Maintainer: Bruno Pagani <archange@archlinux.org>
# Maintainer: Morten Linderud <foxboron@archlinux.org>

_pkg=Data-Perl
pkgname=perl-${_pkg,,}
pkgver=0.002011
pkgrel=3
pkgdesc="Base classes wrapping fundamental Perl data types"
arch=('any')
url="https://metacpan.org/release/${_pkg}"
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
depends=('perl-class-method-modifiers' 'perl-list-moreutils' 'perl-module-runtime'
         'perl-role-tiny' 'perl-scalar-list-utils' 'perl-parent' 'perl-strictures')
checkdepends=('perl-test-deep' 'perl-test-fatal' 'perl-test-output')
source=("https://cpan.metacpan.org/authors/id/T/TO/TOBYINK/${_pkg}-${pkgver}.tar.gz")
sha512sums=('c55f0d5ba6141ef2a3fe02fc4258f4dbc9ae041e5b390dc626f297d68f4fafdafe5deef6ee282718927e101f7c2d93e913117fe754d5fc0c28d206b45e61b285')

build() {
    cd ${_pkg}-${pkgver}
    export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps
    perl Makefile.PL
    make
}

check() {
    cd ${_pkg}-${pkgver}
    make test
}

package() {
    cd ${_pkg}-${pkgver}
    make INSTALLDIRS=vendor DESTDIR="$pkgdir" install
}
